package com.znow.admin.system.security.controller;

import com.google.common.collect.Lists;
import com.znow.common.model.CommonResult;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 权限相关接口
 *
 * @author Nemo
 * @date 2022/12/19
 */
@RequestMapping("/sys")
@RestController
public class SysLogController {

    @PreAuthorize("ps.hasAllPermissions('sys:log')")
    @GetMapping("/log/list")
    public CommonResult<?> getTreeMenu() {
        List<Map<String, Object>> mapList = Lists.newArrayList();
        Map<String, Object> map = new HashMap<>();
        map.put("id", 1);
        map.put("status", 1);
        mapList.add(map);
        return CommonResult.success(mapList);
    }
}
